<template>
  <div class="orderList">
    <div class="orderBox">
      <div class="title">
        <span>
          <svg-icon icon-class="store1" class="svg"></svg-icon>
          {{order.shop}}
        </span>
        <span class="spanRed"> 待发货 </span>
      </div>
      <!-- 单个商品 -->
      <good v-for="(item,index) in order.goods" :key="index" :good="item"> </good>
      <div class="price">应付款：<span>￥{{order.orderPrice}}</span></div>
    </div>
    <div class="footer">
     <!-- 0待付款  1待发货 2待收获 3待评价 -->
      
      <div class="styleB" v-if="order.orderState === 0">
       取消订单
      </div>
      <div class="styleA" v-if="order.orderState === 0">
       付款
      </div>
      
      <div class="styleB" v-if="order.orderState === 1">
       提醒发货
      </div>
      
      <div class="styleB" v-if="order.orderState === 3">
       删除订单
      </div>
      <div class="styleB" v-if="order.orderState === 2 || order.orderState === 3">
       查看物流
      </div>
      <div class="styleA" v-if="order.orderState === 2">
       确认收货
      </div>
      <div class="styleA" v-if="order.orderState === 3">
       评价
      </div>
    </div>
  </div>
</template>

<script>

import good from "./good"
export default {
  props:[
    'orederList'
  ],
  components:{
    good,
  },
  name: "orderList",
  data() {
    return {
      order:this.orederList
    };
  },
  mounted(){
  },
  methods: {
  },
};
</script>


<style lang="stylus" scoped>
@import '../../../assets/stylus/border.styl';
.svg {
  margin-bottom: -0.02rem;
  width: 0.2rem;
  height: 0.2rem;
}
.orderBox {
  border_1px(0 0 1px 0, #f2f2f2);
  width: 100%;
  border-top: 0.1rem solid #F2F2F2;
  background #fff
  .title {
    display: flex;
    justify-content: space-between;
    font-size: 0.14rem;
    line-height: 0.5rem;
    padding: 0 0.2rem 0 0.2rem;
    .spanRed {
      font-size: 0.12rem;
      color: #FF6262;
    }
  }
  .price {
    padding: 0 0.2rem 0 0.2rem;
    display: flex;
    justify-content: flex-end;
    line-height: 0.44rem;
    font-size: 0.12rem;

    span {
      font-size: 0.14rem;
      color: #FF6262;
    }
  }
}
  .footer 
    line-height: 0.56rem;
    padding-right .2rem
    height .56rem
    display flex
    background #fff
    justify-content flex-end
    align-items center
    div 
      margin-left .10rem
      width .8rem
      line-height .28rem
      text-align center
    .styleB
      border_1px(1px,#cccccc,solid,25px)
      background #fff
      color #666
    .styleA 
      border_1px(1px, #666ee8,solid,25px)
      color #666
      background #757cea
      color #fff
  
</style>
